using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Irc.Net
{
	static class Program
	{
		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main()
		{
			Application.SetCompatibleTextRenderingDefault(false);
			Application.EnableVisualStyles();
			Application.DoEvents();
			Application.ThreadException += delegate(object sender, System.Threading.ThreadExceptionEventArgs e) {
				MessageBox.Show("An exception has occured!\r\nPlease report this issue and the stack trace in \r\n\"Debug.stack.txt\" to the IRC.NET Issue Tracker.\r\n\r\nShutting down now...", "Exception");
				System.IO.File.AppendAllText("Debug.stack.txt", "Exception! " + e.Exception.Message + "\r\n\tStack trace as follows:\r\n"+e.Exception.StackTrace+"\r\n\r\n");
				Application.Exit();
			};
			Application.Run(new Main());
		}
	}
}
